<template>
	<div>
		<nav-bar id="gb-custom-header" class="relative" />
		<slot />
	</div>
</template>
<script lang="ts" setup>
onMounted(async () => {
	await nextTick();
	await useDeviceType();
	const throttledUseDeviceType = debounce(useDeviceType, 200);
	window.onresize = throttledUseDeviceType;
	useHeaderRoom(document.querySelector("#gb-custom-header")!);
	console.log(useRequestURL());
});
// 组件卸载时清除事件监听器
onUnmounted(() => {
	window.onresize = null; // 或者使用 removeEventListener，但在这里直接设为 null 就足够了
});
</script>

<style lang="less" scoped></style>
